<?xml version="1.0" encoding="utf-8"?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="NBooks.Core.Models" assembly="NBooks.Core">
	<class name="Module" table="modules">
		<id name="Id" column="id">
			<generator class="identity" />
		</id>
		<property name="Name" column="name" />
		<property name="Inactive" column="inactive" />
		<bag name="Commands" inverse="true" cascade="all-delete-orphan">
			<key column="module_id" />
			<one-to-many class="ModuleCommand" />
		</bag>
	</class>
	<class name="ModuleCommand" table="modules_commands">
		<id name="Id" column="id">
			<generator class="identity" />
		</id>
		<many-to-one name="Module" class="Module" column="module_id" />
		<property name="Name" column="name" />
		<property name="Command" column="command" />
	</class>
</hibernate-mapping>